package com.tledu.spring06.spring01.service;

import lombok.Setter;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 测试集合的注入
 *
 * @author Antg
 * @date 2021/8/520:27
 */
public class UserServiceImpl5 implements UserService {
    @Setter
    private List<String> list;
    @Setter
    private Set<String> set;
    @Setter
    private Map<String, String> map;

    @Override
    public void testService() {
        System.out.println("=========List的注入========");
        list.forEach(x -> System.out.println(x));
        System.out.println("=========Set的注入========");
        set.forEach(x -> System.out.println(x));
        System.out.println("=========Map的注入========");
        map.forEach((x, y) -> System.out.println(x + "--->" + y));
    }
}
